#include "Circle.h"
#include <iostream>
#include <fstream>

//copy-constructor
Circle::Circle(const Circle& other)
{
	center = other.center;	
	m_radius = other.m_radius;
}

Circle::~Circle()
{
	//???
}

double Circle::Get_area()
{
	return M_PI * m_radius * m_radius;
}

bool Circle::operator==(const Circle& other) const
{
	if(center==other.center && m_radius == other.m_radius)
	{
		return true;
	}
	
	return false;
}

std::ostream& operator<<(std::ostream& os, const Circle& circle)
{		
	os << circle.center << " radius: " << circle.m_radius;	
	return os;
}

Circle& operator>>(std::ifstream& is, Circle& circle)
{
	char  buff[20];
	is >> circle.center;
	is >>buff >> circle.m_radius;

	return circle;
}
